package string;
/**
 * toUpperCase:将字符串的所有字符转为大写
 * toLowerCase:将字符串的所有字符转为小写
 */

import java.util.Scanner;

public class ToUpperCase {
    public static void main(String[] args) {
        String line ="我爱Java";
        System.out.println(line);
        String upper =line.toUpperCase();
        System.out.println(upper);
        String lower= line.toLowerCase();
        System.out.println(lower);

        String code = "3Uab6";
        System.out.println("请输入验证码:"+code);
        Scanner scan = new Scanner(System.in);
        String input = scan.nextLine();
//        code =code.toLowerCase();
//        input =input.toLowerCase();
//        if (code.equals(input)){
//            System.out.println("输入正确");
//        }else{
//            System.out.println("输入错误");
//        }
        System.out.println(code.equalsIgnoreCase(input));
    }
}
